#!/bin/bash

DIR_SRC=messages
DIR_DEST=gen

mkdir -p $DIR_DEST

PROTOBUFS=$(find $DIR_SRC -name "*.proto")

for PROTO in $PROTOBUFS
do
    echo $PROTO
    protoc -I=$DIR_SRC --cpp_out=$DIR_DEST $PROTO
done

